package com.excel.entity;

import com.excel.annotation.PoiExcel;
import com.excel.enums.PoiColorEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.beans.Transient;
import java.io.Serializable;
import java.util.*;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ExcelTable implements Serializable {

    @PoiExcel(name = "主键",orderNum = 0)
    private Long id;

    @PoiExcel(name = "{name}",groupName = "{peopleInfo}",orderNum = 1,desensitizationRule = "1,3",color = PoiColorEnum.BLUE,width = 20)
    private String name;

    @PoiExcel(name = "性别",groupName = "{peopleInfo}",orderNum = 2,exportReplace  ={"男_M","女_F"},importReplace = {"M_男","F_女"},importIsMust = false)
    private String gender;

    @PoiExcel(name = "生日",orderNum = 3,exportFormat="yyyy-MM-dd HH:mm:ss",importFormat = "yyyy-MM-dd HH:mm:ss",importIsMust = false)
    private Date birthday;

    @PoiExcel(name = "电话号",orderNum = 4,desensitizationRule = "3,4")
    private String mobilePhone;

    @PoiExcel(name = "身份证",orderNum = 5,desensitizationRule="6_4" ,width = 20)
    //@Excel(width = )
    private String cardNo;

}